import request from '@/utils/request'
/*/**
 * @description:标签查询列表接口
 * @param {type} query:查询条件对象,current:当前页码,size:展示几条数据
 * @return: promise
 */
export function ApiGetLabelList(query, current = 1, size = 20) {
  return request({
    url: `/article/label/search`,
    method: 'post',
    data: {
      ...query,
      current,
      size
    }
  })
}
/*/**
 * @description:所有正常分类状态接口
 * @param {type} 无
 * @return: promise
 */
export function ApiGetNormalStatus() {
  return request({
    url: `/article/category/list`,
    method: 'get'
  })
}
/*/**
 * @description:新增标签接口
 * @param {type} data 新增标签数据
 * @return: promise
 */
export function ApiAdd(data) {
  return request({
    url: `/article/label`,
    method: 'post',
    data
  })
}
/*/**
 * @description:查询编辑标签接口
 * @param {type} id 对应数据的id
 * @return: promise
 */
export function ApiGetById(id) {
  return request({
    url: `/article/label/${id}`,
    method: 'get'
  })
}
/*/**
 * @description:修改类别详情接口
 * @param {type} id:查询id
 * @return: promise
 */
export function ApiUpId(data) {
  return request({
    url: `/article/label`,
    method: 'put',
    data
  })
}
/*/**
 * @description:删除标签接口
 * @param {type} id:删除id
 * @return: promise
 */
export function ApiDelId(id) {
  return request({
    url: `/article/label/${id}`,
    method: 'delete'
  })
}
